﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.ComponentModel;

using SiteUnity.Layers.Application;
using SiteUnity.Frame.Common;
using SiteUnity.Layers.Application.BaseClasses;
using SiteUnity.Frame.Common.Tools;

namespace SiteUnity.Frame.Modules
{
    [DefaultProperty("Text")]
    [ToolboxData("<{0}:PageDate runat=server/>")]
    public class PageDate : BaseWebControl
    {
        protected override void RenderContents(HtmlTextWriter output)
        {
            string pageDate = Formatter.Date(SiteManager.Website.CurrentPage.Date);
            output.Write(pageDate);
        }
    }
}
